package com.ruoyi.canteen.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.canteen.mapper.CanteenMdMapper;
import com.ruoyi.canteen.domain.CanteenMd;
import com.ruoyi.canteen.service.ICanteenMdService;

/**
 * 门店Service业务层处理
 * 
 * @author zhangw
 * @date 2021-09-08
 */
@Service
public class CanteenMdServiceImpl implements ICanteenMdService 
{
    @Autowired
    private CanteenMdMapper canteenMdMapper;

    /**
     * 查询门店
     * 
     * @param mdId 门店主键
     * @return 门店
     */
    @Override
    public CanteenMd selectCanteenMdByMdId(Long mdId)
    {
        return canteenMdMapper.selectCanteenMdByMdId(mdId);
    }


    @Override
    public CanteenMd selectCanteenMdByDeptId(Long deptId) {
        return canteenMdMapper.selectCanteenMdByDeptId(deptId);
    }

    /**
     * 查询门店列表
     * 
     * @param canteenMd 门店
     * @return 门店
     */
    @Override
    public List<CanteenMd> selectCanteenMdList(CanteenMd canteenMd)
    {
        return canteenMdMapper.selectCanteenMdList(canteenMd);
    }

    /**
     * 查询首页门店列表
     *
     * @param canteenMd 门店
     * @return 门店
     */
    @Override
    public List<CanteenMd> selectIndexCanteenMdList(CanteenMd canteenMd){
        return canteenMdMapper.selectIndexCanteenMdList(canteenMd);
    }

    /**
     * 新增门店
     * 
     * @param canteenMd 门店
     * @return 结果
     */
    @Override
    public int insertCanteenMd(CanteenMd canteenMd)
    {
        return canteenMdMapper.insertCanteenMd(canteenMd);
    }

    /**
     * 修改门店
     * 
     * @param canteenMd 门店
     * @return 结果
     */
    @Override
    public int updateCanteenMd(CanteenMd canteenMd)
    {
        return canteenMdMapper.updateCanteenMd(canteenMd);
    }

    /**
     * 批量删除门店
     * 
     * @param mdIds 需要删除的门店主键
     * @return 结果
     */
    @Override
    public int deleteCanteenMdByMdIds(Long[] mdIds)
    {
        return canteenMdMapper.deleteCanteenMdByMdIds(mdIds);
    }

    /**
     * 删除门店信息
     * 
     * @param mdId 门店主键
     * @return 结果
     */
    @Override
    public int deleteCanteenMdByMdId(Long mdId)
    {
        return canteenMdMapper.deleteCanteenMdByMdId(mdId);
    }
}
